package com.itheima.api2;

import java.math.BigDecimal;
import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.Scanner;

public class Demo5 {
    public static void main(String[] args) throws ParseException {
        Scanner sc=new Scanner(System.in);
        System.out.println("请输入一个您的出生日期:");
        String birthday=sc.next();
        SimpleDateFormat simpleDateFormat=new SimpleDateFormat("yyyy-MM-dd");
        Date date = simpleDateFormat.parse(birthday);
        Long time=date.getTime();
        Date date1=new Date();
        Long time1=date1.getTime();
        Long birthtime=time1-time;
        System.out.println("您已经在这个世界上活了"+birthtime+"毫秒");

       // System.out.println(bigDecimal.divide(new BigDecimal(1000)));


    }
}
